import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    meta:{title:'首页'}
  },
  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/document',
    name: 'document',
    component: () => import('../views/DocumentView.vue'),

    meta:{title:'文档'}
  },
  {
    path: '/news',
    name: 'news',
    component: () => import('../views/NewsView.vue'),
    meta:{title:'新闻'}
  },
  {
    path: '/download',
    name: 'download',
    component: () => import('../views/DownloadView.vue'),
    meta:{title:'下载'}
  },
  {
    path: '/vision',
    name: 'vision',
    component: () => import('../views/VisionView.vue'),
    meta:{title:'愿景'}
  },
  {
    path: '/product',
    name: 'product',
    component: () => import('../views/ProductView.vue'),
    meta:{title:'产品'}
  },
  {
    path: '/cooperation',
    name: 'cooperation',
    component: () => import('../views/CooperationView.vue'),
    meta:{title:'合作'}
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
